<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {if $row.type == 'install'}
            <label class="control-label">安装</label>
            {else}
            <label class="control-label">维修</label>
            {/if}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('订单城市')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="control-label">{$row.province|htmlentities}/{$row.city|htmlentities}/{$row.area|htmlentities}</label>
        </div>
    </div>

    <div class="form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('经度')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lng" class="form-control" name="row[address_lng]" type="text" value="{$row.address_lng|htmlentities}">
        </div>
    </div>

    <div class="form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('纬度')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lat" class="form-control" name="row[address_lat]" type="text" value="{$row.address_lat|htmlentities}">
            <input id="c-id" class="form-control" name="row[id]" type="text" value="{$row.id|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('详细地址')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="control-label">{$row.address|htmlentities}</label>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('下单用户')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="control-label">{$row.name}</label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="control-label">{$row.mobile|htmlentities}</label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户预约时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reservation_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[reservation_time]" type="text" value="{$row.reservation_time|htmlentities}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('预计上门时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="control-label">{$row.arrival_time|htmlentities}</label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('接单师傅')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="control-label">{$row.master_name|htmlentities}</label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('师傅电话')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="control-label">{$row.master_mobile|htmlentities}</label>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-primary nearby">附近师傅</button>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('确认订单备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-memo" class="form-control" rows="5" name="row[memo]">{$row.memo}</textarea>
        </div>
    </div>

    <!--安装充电桩参数-->
    <div class="form-group {if $row.type == 'repair'}hide{/if}" id="install">
        <label class="control-label col-xs-12 col-sm-2">{:__('安装服务')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="control-label">{$row.power_name}{$row.package_name}{$row.package_type_name}</label>
        </div>
    </div>

    <!--维修充电桩参数-->
    <div class="{if $row.type == 'install'}hide{/if}" id="repair">

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('设备名称')}:</label>
            <div class="col-xs-12 col-sm-8">
                <label class="control-label">{$row.device_name}</label>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('设备型号')}:</label>
            <div class="col-xs-12 col-sm-8">
                <label class="control-label">{$row.device_model}</label>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2" >{:__('维修类型')}:</label>
            <div class="col-xs-12 col-sm-8">
                {:Form::selectpage('row[repair_type]', $row.repair_type, 'report_type/index', null, null, ['disabled'=>'disabled'])}
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('问题')}:</label>
            <div class="col-xs-12 col-sm-8">
                <label class="control-label">{$row.title}</label>
            </div>
        </div>

        <div class="form-group">
            <label class="control-label col-xs-12 col-sm-2">{:__('描述')}:</label>
            <div class="col-xs-12 col-sm-8">
                <label class="control-label">{$row.description}</label>
            </div>
        </div>

        <div class="form-group">
            <label for="c-annex" class="control-label col-xs-12 col-sm-2">{:__('附件')}:</label>
            <div class="col-xs-12 col-sm-8">
                <ul class="row list-inline faupload-preview" id="p-annex">
                    {php}
                    $annex = explode(',',$row['annex']);
                    {/php}
                    {foreach $annex as $key=>$item}
                    <li class="col-xs-3">
                        <a href="{$item}" data-url="{$item}" target="_blank" class="thumbnail">
                            <img src="{$item}" onerror="this.src='/xtGwSBDCQl.php/ajax/icon?suffix=jpg';this.onerror=null;" class="img-responsive">
                        </a>
                    </li>
                    {/foreach}
                </ul>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <label class="control-label">{$row.amount|htmlentities}</label>
        </div>
    </div>

    {if $row.finish_annex}
    {foreach $row.finish_annex as $key=>$item}
    <div class="form-group">
        <label for="c-annex" class="control-label col-xs-12 col-sm-2">{$item.name}:</label>
        <div class="col-xs-12 col-sm-8">
            <ul class="row list-inline faupload-preview">
                <li class="col-xs-3">
                    <a href="{$item.value}" data-url="{$item.value}" target="_blank" class="thumbnail">
                        <img src="{$item.value}" onerror="this.src='/xtGwSBDCQl.php/ajax/icon?suffix=jpg';this.onerror=null;" class="img-responsive">
                    </a>
                </li>
            </ul>
        </div>
    </div>
    {/foreach}
    {/if}



    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:Form::radios('row[status]', ['0'=>'待接单', '1'=>'待上门', '2'=>'服务中', '3'=>'已完结', '100'=>'已取消'], $row.status,
            ['data-rule'=>'required'])}
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
